<?php
namespace console\controllers;

use Yii;
use yii\console\Controller;
use common\models\Logger;
use common\models\Email;

/**
 * Email controller
 */
class EmailController extends Controller
{
    /**
     * index Email
     *
     * @return 0
     */
    public function actionIndex()
    {
        $time = time();
        while (time() < $time+60) {
            Email::read();
            sleep(1);
        }
        return 0;
    }
}




























